/*
 * @lc app=leetcode.cn id=1880 lang=javascript
 *
 * [1880] 检查某单词是否等于两单词之和
 */

// @lc code=start
const getSum = (str) => {
  return str.split('').map(item => item.charCodeAt() - 'a'.charCodeAt()).join('');
}
/**
 * @param {string} firstWord
 * @param {string} secondWord
 * @param {string} targetWord
 * @return {boolean}
 */
var isSumEqual = function (firstWord, secondWord, targetWord) {
  let f = getSum(firstWord);
  let s = getSum(secondWord);
  let t = getSum(targetWord);
  return BigInt(f) + BigInt(s) === BigInt(t);
};
// @lc code=end

